Ext.define('Seq.data.TableChartData', {
    extend: 'Ext.pivot.Grid',
    alias: 'widget.tablechartdata',

    requires: ['Ext.grid.plugin.Clipboard', 'Ext.grid.selection.SpreadsheetModel',
        'Ext.pivot.plugin.Exporter', 'Ext.pivot.plugin.Configurator'],

    plugins: ['clipboard', 'pivotexporter'],

    selModel: {
        type: 'spreadsheet'
    },

    itemId: 'table',
    cls: 'box-border-panel',

    bind: {
        store: '{tableStore}'
    },

    listeners: {
        refreshdata: 'onRefreshTable'
    },

    matrix: {
        type: 'local',
        textGrandTotalTpl: '汇总',
        rowGrandTotalsPosition: 'none',
        colGrandTotalsPosition: 'none',
        rowSubTotalsPosition: 'none',
        colSubTotalsPosition: 'none',

        aggregate: [{
            dataIndex: 'val',
            header: '汇总',
            aggregator: 'sum',
            align: 'right',
            width: 85
        }]
    }
});